
const commonUtils = {
  //搜索最近成本项
  searchLastNotCloseItem: function (data, index) {
    let newData = Object.keys(data)
    let reulstkey = ''
    if (index > 0) {
      // console.log(newData.reverse())
      // console.log(data)
      newData.reverse().forEach((item, currentIndex) => {
        if (!data[item].isClose && !reulstkey) {
          reulstkey = item
          console.log(currentIndex)
          return
        }
      })
    }
    return reulstkey
  }
}

export default commonUtils
